<div ng-controller="securityBaseController">
    <div class="security app-container ng-scope" ng-controller="securityConfigController">

        <securityc-header></securityc-header>

        <div class="container">
            <div class="row">

                <div style="margin-bottom: 10px;">
                    <div style="display: inline;">
                            <span class="kuiInfoButton help" tooltip="Displays the currently configured authentication and authorization modules and their settings. Use the securityadmin command line tool to change this configuration.">
                                <svg class="euiIcon euiIcon--large" focusable="false" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path id="help-a" d="M13.6 12.186l-1.357-1.358c-.025-.025-.058-.034-.084-.056.53-.794.84-1.746.84-2.773a4.977 4.977 0 0 0-.84-2.772c.026-.02.059-.03.084-.056L13.6 3.813a6.96 6.96 0 0 1 0 8.373zM8 15A6.956 6.956 0 0 1 3.814 13.6l1.358-1.358c.025-.025.034-.057.055-.084C6.02 12.688 6.974 13 8 13a4.978 4.978 0 0 0 2.773-.84c.02.026.03.058.056.083l1.357 1.358A6.956 6.956 0 0 1 8 15zm-5.601-2.813a6.963 6.963 0 0 1 0-8.373l1.359 1.358c.024.025.057.035.084.056A4.97 4.97 0 0 0 3 8c0 1.027.31 1.98.842 2.773-.027.022-.06.031-.084.056l-1.36 1.358zm5.6-.187A4 4 0 1 1 8 4a4 4 0 0 1 0 8zM8 1c1.573 0 3.019.525 4.187 1.4l-1.357 1.358c-.025.025-.035.057-.056.084A4.979 4.979 0 0 0 8 3a4.979 4.979 0 0 0-2.773.842c-.021-.027-.03-.059-.055-.084L3.814 2.4A6.957 6.957 0 0 1 8 1zm0-1a8.001 8.001 0 1 0 .003 16.002A8.001 8.001 0 0 0 8 0z"></path></defs><use xlink:href="#help-a" fill-rule="evenodd"></use></svg>
                            </span>
                        <h3 class="indexheading euiTitle euiTitle--medium" style="display: inline;">Authentication and Authorization</h3>
                        <a ng-href="#/" class="kuiButton kuiButton--basic kuiButton--iconText" style="display: inline; float: right;">
                            <span class="kuiButton__icon kuiIcon fa-chevron-left"></span>
                            Back
                        </a>
                    </div>
                </div>
            </div>
        </div>

        <div class="container">

            <h2 class="euiTitle euiTitle--small" style="margin-bottom: 20px;">Authentication</h2>

            <div class="container">
                <div class="row" data-ng-repeat="authc in sortedAuthc">
                    <div class="col-xs-12" style="color: red">

                        <accordeon additional-class="{{authcclass(authc)}}" title="{{authctitle(authc)}}" is-collapsed="true">

                            <table class="kuiTable">
                                <tbody>
                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Enabled on REST?
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authc.http_enabled}}
                                    </td>
                                </tr>
                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Enabled on Transport?
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authc.transport_enabled}}
                                    </td>
                                </tr>

                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            HTTP Authenticator Type
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authc.http_authenticator.type}}
                                    </td>
                                </tr>

                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            HTTP Challenge
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authc.http_authenticator.challenge}}
                                    </td>
                                </tr>

                                <tr class="kuiTableRow" ng-if="authc.http_authenticator.config">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            HTTP Authenticator Configuration
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop"><pre>{{stringifyJson(authc.http_authenticator.config)}}</pre>
                                    </td>
                                </tr>

                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Authentication Backend Type
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authc.authentication_backend.type}}
                                    </td>
                                </tr>


                                <tr data-test-subj="userRow" class="kuiTableRow" ng-if="authc.authentication_backend.config">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Authentication Backend Configuration
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <pre>{{stringifyJson(authc.authentication_backend.config)}}</pre></td>
                                </tr>

                                </tbody>
                            </table>


                        </accordeon>
                    </div>
                </div>
            </div>

            <h2 class="euiTitle euiTitle--small" style="margin-bottom: 20px;">Authorization</h2>

            <div class="container">
                <div class="row" data-ng-repeat="authz in sortedAuthz">
                    <div class="col-xs-12">
                        <accordeon additional-class="{{authzlass(authz)}}" title="{{authztitle(authz)}}" is-collapsed="true">
                            <table class="kuiTable">
                                <tbody>
                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Enabled on REST?
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authz.http_enabled}}
                                    </td>
                                </tr>
                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Enabled on Transport?
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authz.transport_enabled}}
                                    </td>
                                </tr>

                                <tr class="kuiTableRow">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Authorization Backend Type
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop">
                                        {{authz.authorization_backend.type}}
                                    </td>
                                </tr>
                                <tr class="kuiTableRow" ng-if="authz.authorization_backend.config">
                                    <td class="kuiTableRowCell cellAlignTop">
                                        <div class="kuiTableRowCell__liner">
                                            Authorization Backend Configuration
                                        </div>
                                    </td>
                                    <td class="kuiTableRowCell cellAlignTop"><pre>{{stringifyJson(authz.authorization_backend.config)}}</pre>

                                    </td>
                                </tr>

                                </tbody>
                            </table>


                        </accordeon>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
